<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<div th:replace="include/header::head"></div>

<div th:replace="include/student_navbar::navbar(${loginStudent})"></div>

<div class="container">
	<h1>
		<img th:src="@{/static/img/exam-student.png}" /> <span th:text="${exam.name} + '  上机考试中...'"></span>
	</h1>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span6">
				<h3>试卷下载</h3>
				<br/>
				<th:block th:if="${exam.paper!=null and !#strings.isEmpty(exam.paper)}">
					<a class="btn" target="_blank" th:href="@{/student/exam/download/}"><i class="icon-download"></i>下载查看</a>
				</th:block>
				<th:block th:if="${exam.paper==null or #strings.isEmpty(exam.paper)}">
					<p class="exam-info">本次考试没有电子试卷。</p>
				</th:block>
			</div>
			<div class="span6">
				<h3>答案上传</h3>
				<br/>
				<p>请按照考试要求将答案文件打包，再次进行上传。同名文件多次上传将会覆盖。</p>
				<form class="form-inline" id="upForm" th:action="@{/student/exam/upload}" enctype="multipart/form-data" method="post">
					<input type="file" name="answer" />
					<input type="submit" id="upload" class="btn btn-primary" value="上传" />
				</form>
			</div>
		</div>
	</div>

	<div class="container-fluid">
		<div th:if="${application.noticeList} != null" class="row-fluid">
			<h4>已有通知消息</h4>
			<table class="table table-striped table-bordered">
				<thead>
				<tr>
					<th class="span7">通知内容</th>
				</tr>
				</thead>
				<tbody>
				<tr th:each="notice, s : ${application.noticeList}">
					<td th:text="${notice}"></td>
				</tr>
				</tbody>
			</table>
		</div>
		<div th:if="${application.noticeList} == null" class="row-fluid">
			<h4>没有通知消息</h4>
		</div>
	</div>

</div>

<div th:replace="include/student_footer::footer"></div>
